const router = require('koa-router')()
const apply_controllers = require('../../controllers/apply_controllers')
const jwt_auth = require('../../middleware/jwt_auth')
const jwt_info = require('../../middleware/jwt_info')

router
// 提交表单到数据库
  .post('/apply/input', apply_controllers.add_apply)
  .get('/apply/qntoken',apply_controllers.add_token)
  .get('/apply/getAllApply',apply_controllers.get_AllAppl)
  // .get('/apply/getApply/:id', apply_controllers.get_apply)
  .get('/apply/getApply/:id', apply_controllers.get_apply)
  .post('/applyinst', apply_controllers.post_apply_inst)
// 首页6条数据
  .get('/apply/top6', apply_controllers.get_apply_top6)

  // 模糊查询
  .post('/apply/select', apply_controllers.post_apply_select)
// 参与活动是否重复
  .post('/apply/Duplicate', apply_controllers.Duplicate)
  // 获取
  .post('/apply/insted',apply_controllers.post_apply_insted)
  .post('/apply/delete', apply_controllers.delete_apply_insted)
// 修改
//   .post('/user', user_controllers.register)
//   .get('/user/:id', jwt_auth, user_controllers.get_user)
//   .post('/user/token', jwt_auth, user_controllers.auth_token)


module.exports = router